package org.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


/**
* @Author: 鸢一折纸
* @Email: 3498881048@qq.com
* @Date: 2025/09/08 8:32
* @Description: ${Description}
**/
    
    
/**
    * 请假申请表
    */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "leave_application")
public class LeaveApplication {
    @TableId(value = "leave_id", type = IdType.INPUT)
    private Integer leaveId;

    @TableField(value = "user_id")
    private Integer userId;

    @TableField(value = "attendance_cycle")
    private String attendanceCycle;

    @TableField(value = "leave_type")
    private String leaveType;

    @TableField(value = "application_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date applicationDate;

    @TableField(value = "start_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @TableField(value = "end_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    @TableField(value = "leave_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date leaveDate;

    @TableField(value = "duration")
    private BigDecimal duration;

    @TableField(value = "leave_period")
    private Object leavePeriod;

    @TableField(value = "reason")
    private String reason;

    @TableField(value = "`status`")
    private Object status;

    @TableField(value = "created_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;

    @TableField(value = "updated_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedAt;

    @TableField(value = "related_document")
    private String relatedDocument;

    @TableField(value = "annual_id")
    private Integer annualId;

    @TableField(exist = false)
    private AnnualLeave annualLeave;
}